<form class="layui-form">
    <label class="layui-form-label">范围选择</label>
    <div class="layui-input-inline">
        <input type="text" name="start_date" value="{$data.start_date}" class="layui-input laydate-date-start" id="test1" placeholder="请选择开始时间">
    </div>
    <div class="layui-input-inline">
        <input type="text" name="end_date" placeholder="请选择结束时间" value="{$data.end_date}" class="layui-input laydate-date-end" id="test2">
    </div>

    <div class="layui-input-inline">
        <select name="company_id">
            <option value="">合作企业</option>
            {volist name='company' id='c'}
            <option value="{$c.company_id}"{eq name="$c.company_id" value="$data.company_id" }selected{/eq} >{$c.company_name}</option>
            {/volist}
        </select>
    </div>
    <button class="layui-btn">查询</button>
    <a class="layui-btn" href="{:url('Contract/addcontract')}">添加合同</a>
</form>
<style>
    table{
        width: 100% !important;
    }
</style>

<table class="layui-table" lay-filter="edit-table" lay-data="{method: 'post',loading:'true',
url:'{:url('Contract/contractlist')}', where:{start_date:'{$data.start_date}',end_date:'{$data.end_date}',company_id:'{$data.company_id}'},page:true, id:'idDemo'}" lay-filter="test">

    <thead>
    <tr>
        <th lay-data="{field:'contract_id'}">ID</th>
        <th lay-data="{field:'company_name'}">合作企业</th>
        <th lay-data="{field:'username'}">业务经理</th>
        <th lay-data="{field:'start_time'}">开始时间</th>
        <th lay-data="{field:'end_time'}">结束时间</th>
        <th lay-data="{toolbar:'#content'}">合作内容</th>
    </tr>
    </thead>
</table>
<script type="text/html" id="content">
    <a class="layui-btn layui-btn-xs "  href="{:url('Contract/info')}?contract_id={{d.contract_id}}">查看详情</a>
</script>

